<?php
use common\service\StaticService;
use common\service\GlobalUrlService;
use shopend\assets\ShopAsset;

StaticService::includeAppCssStatic(GlobalUrlService::buildShopStaticUrl('/css/index.css'),ShopAsset::class);
StaticService::includeAppCssStatic(GlobalUrlService::buildShopStaticUrl('/css/index/index.css'),ShopAsset::class);
StaticService::includeAppJsStatic(GlobalUrlService::buildShopStaticUrl('/js/index.js'),ShopAsset::class);
StaticService::includeAppJsStatic(GlobalUrlService::buildShopStaticUrl('/js/main.js'),ShopAsset::class);
StaticService::includeAppJsStatic(GlobalUrlService::buildShopStaticUrl('/js/cache.js'),ShopAsset::class);

StaticService::includeAppCssStatic(GlobalUrlService::buildShopStaticUrl('/css/dashboard/index.css'),ShopAsset::class);
StaticService::includeAppCssStatic(GlobalUrlService::buildShopStaticUrl('/css/dashboard/add-pt.css'),ShopAsset::class);
StaticService::includeAppJsStatic(GlobalUrlService::buildShopStaticUrl('/backend/dashboard/index.js'),ShopAsset::class);
StaticService::includeAppJsStatic(GlobalUrlService::buildShopStaticUrl('/js/laydate/laydate.js'),ShopAsset::class);

?>
<blockquote class="layui-elem-quote layui-bg-green">
    <input type="hidden" id="current-user" value="<?= $this->params['current_user']['shop_name']?>">
    <div id="nowTime"></div>
</blockquote>
<div class="layui-row layui-col-space20 panel_box">
    <div class="panel layui-col-xs12 layui-col-sm6 layui-col-md4 layui-col-lg4">
        <a href="javascript:;">
            <div class="panel_icon layui-bg-green">
                <i class="layui-anim seraph icon-icon10"></i>
            </div>
            <div class="panel_word">
                <span>日销售金额<?=$data['day_money']?></span>
                <cite>总销售金额<?=$data['count_money']?></cite>
            </div>
        </a>
    </div>
    <div class="panel layui-col-xs12 layui-col-sm6 layui-col-md4 layui-col-lg4">
        <a href="javascript:;">
            <div class="panel_icon layui-bg-black">
                <i class="layui-icon layui-anim seraph layui-icon-rmb"></i>
            </div>
            <div class="panel_word">
                <span>日订单量<?=$data['day_order']?></span>
                <cite>总订单量<?=$data['count_order']?></cite>
            </div>
        </a>
    </div>
    <div class="panel layui-col-xs12 layui-col-sm6 layui-col-md4 layui-col-lg4">
        <a href="javascript:;">
            <div class="panel_icon layui-bg-red">
                <i class="layui-icon layui-icon-cart layui-anim seraph"></i>
            </div>
            <div class="panel_word">
                <span>总商品销量<?=$data['count_goods']?></span>
            </div>
        </a>
    </div>
    <div class="panel layui-col-xs12 layui-col-sm6 layui-col-md4 layui-col-lg4">
        <a href="javascript:;">
            <div class="panel_icon layui-bg-orange">
                <i class="layui-anim seraph icon-good" data-icon="icon-icon10"></i>
            </div>
            <div class="panel_word userAll">
                <span>总活动数<?=$data['active_count']?></span>
            </div>
        </a>
    </div>
    
    <div class="panel layui-col-xs12 layui-col-sm6 layui-col-md4 layui-col-lg4">
        <a href="javascript:;">
            <div class="panel_icon layui-bg-blue">
                <i class="layui-anim seraph icon-clock"></i>
            </div>
            <div class="panel_word">
                <span class="loginTime"><?= date('Y-m-d H:i:s',$this->params['current_user']['login_time'])?></span>
                <cite>上次登录时间</cite>
            </div>
        </a>
    </div>
</div>


<!-- <div class="content_box">
    <div class="layui-row layui-col-space20">
        <div class="layui-col-xs12 layui-col-sm6 layui-col-md4 layui-col-lg4">
            <div class="item layui-bg-black">
                <div class="icon_box"><i class="layui-icon layui-anim seraph layui-icon-rmb"></i></div>
                <p class="text">
                    <strong>日销售金额<?=$data['day_money']?></strong>
                    <span>总销售金额<?=$data['count_money']?></span>
                </p>
            </div>
        </div>
        <div class="layui-col-xs12 layui-col-sm6 layui-col-md4 layui-col-lg4">
            <div class="item layui-bg-red">
                <div class="icon_box"><i class="layui-icon layui-icon-cart layui-anim seraph"></i></div>
                <p class="text">
                    <strong>日订单量<?=$data['day_order']?></strong>
                    <span>总订单量<?=$data['count_order']?></span>
                </p>
            </div>
        </div>
        <div class="layui-col-xs12 layui-col-sm6 layui-col-md4 layui-col-lg4">
            <div class="item layui-bg-orange">
                <div class="icon_box"><i class="layui-anim seraph icon-good" data-icon="icon-icon10"></i></div>
                <p class="text">
                    <strong>总商品销量<?=$data['count_goods']?></strong>
                </p>
            </div>
        </div>
        <div class="layui-col-xs12 layui-col-sm6 layui-col-md4 layui-col-lg4">
            <div class="item layui-bg-cyan">
                <div class="icon_box"><i class="layui-anim layui-icon layui-icon-app" ></i></div>
                <p class="text">
                    <strong>总活动数<?=$data['active_count']?></strong>
                </p>
            </div>
        </div>
        <div class="layui-col-xs12 layui-col-sm6 layui-col-md4 layui-col-lg4">
            <div class="item layui-bg-blue">
                <div class="icon_box"><i class="layui-anim seraph icon-clock"></i></div>
                <p class="text">
                    <strong><?= date('Y-m-d H:i:s',$this->params['current_user']['login_time'])?></strong>
                    <span>上次登录时间</span>
                </p>
            </div>
        </div>
    </div>
</div> -->
<script src="https://cdn.bootcss.com/echarts/4.0.2/echarts.min.js"></script>
<div class="js-chart-view">
    <blockquote class="cvs_head layui-elem-quote layui-bg-green">
        数据趋势图
    </blockquote>
    <div class="panel-header">
        <ul class="panel-button-group js-button-group-view ">
            <li class="button-item"><a data-day="30" class="button js-button" href="javascript:void(0);">最近30日</a></li>
            <li class="button-item"><a data-day="15" class="button js-button" href="javascript:void(0);">最近15日</a></li>
            <li class="button-item"><a data-day="7" class="button js-button active" href="javascript:void(0);">最近7日</a></li>
            <span class="test"><input type="text" class="span6 b-time time-interval layui-input" value="" placeholder="点击选择开始时间"  id="bg_time2"></span>
            <input type="text" class="span6 e-time time-interval layui-input" value="" placeholder="点击选择结束时间" id="ed_time2" >
            <span class="getorder layui-btn"><i class="layui-icon">&#xe615;</i>搜索</span>
        </ul>
    </div>
    <div class="panel-body" style=" margin-top: 30px; height: 400px;">
        <div id="container"></div>
    </div>
</div>
